const baseUrl = 'http://127.0.0.1:8081/'
export const request = (option) =>{
	return new Promise((resolve,reject) =>{
		uni.request({
			url: baseUrl + option.url,
			data: option.data,
			method: option.method||"GET",
			success: (res) => {
				resolve(res)
			},
			fail: (error) => {
				reject(error)
			}
		})
	})
}

export default request